<%@ page import="com.lanou3g.code0522.Person" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%

    application.setAttribute("keyApp","app域");
    session.setAttribute("keySession","session域");
    request.setAttribute("keyReq","request域");

    Person person = new Person();
    person.setName("张三");
    person.setAge(18);

    //定义的时候写泛型,
    // new的时候不写泛型
    // 这是 java 1.7 的类型推断机制
    // jsp中没有, 所有 泛型不能省略
    Map<String,String> jobs
             = new HashMap<String,String>();
    jobs.put("lanou","CEO");
    jobs.put("bai-du","CTO");
    person.setJobs(jobs);

    String[] title = {"中国XX研究会会员","工会会长"};
    person.setTitles(title);

    session.setAttribute("user",person);

    pageContext.forward("/Test03.jsp?username=%E5%BC%A0%E4%B8%89");
%>

